package com.ruoyi.project.modules.processBranchEnd.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.modules.processBranchEnd.mapper.ProcessBranchEndMapper;
import com.ruoyi.project.modules.processBranchEnd.domain.ProcessBranchEnd;
import com.ruoyi.project.modules.processBranchEnd.service.IProcessBranchEndService;
import com.ruoyi.common.core.text.Convert;

/**
 * 分支结束Service业务层处理
 * 
 * @author smallrain
 * @date 2022-04-03
 */
@Service
public class ProcessBranchEndServiceImpl implements IProcessBranchEndService 
{
    @Autowired
    private ProcessBranchEndMapper processBranchEndMapper;

    /**
     * 查询分支结束
     * 
     * @param branchEndId 分支结束主键
     * @return 分支结束
     */
    @Override
    public ProcessBranchEnd selectProcessBranchEndByBranchEndId(Long branchEndId)
    {
        return processBranchEndMapper.selectProcessBranchEndByBranchEndId(branchEndId);
    }

    /**
     * 查询分支结束列表
     * 
     * @param processBranchEnd 分支结束
     * @return 分支结束
     */
    @Override
    public List<ProcessBranchEnd> selectProcessBranchEndList(ProcessBranchEnd processBranchEnd)
    {
        return processBranchEndMapper.selectProcessBranchEndList(processBranchEnd);
    }

    /**
     * 新增分支结束
     * 
     * @param processBranchEnd 分支结束
     * @return 结果
     */
    @Override
    public int insertProcessBranchEnd(ProcessBranchEnd processBranchEnd)
    {
        return processBranchEndMapper.insertProcessBranchEnd(processBranchEnd);
    }

    /**
     * 修改分支结束
     * 
     * @param processBranchEnd 分支结束
     * @return 结果
     */
    @Override
    public int updateProcessBranchEnd(ProcessBranchEnd processBranchEnd)
    {
        return processBranchEndMapper.updateProcessBranchEnd(processBranchEnd);
    }

    /**
     * 批量删除分支结束
     * 
     * @param branchEndIds 需要删除的分支结束主键
     * @return 结果
     */
    @Override
    public int deleteProcessBranchEndByBranchEndIds(String branchEndIds)
    {
        return processBranchEndMapper.deleteProcessBranchEndByBranchEndIds(Convert.toStrArray(branchEndIds));
    }

    /**
     * 删除分支结束信息
     * 
     * @param branchEndId 分支结束主键
     * @return 结果
     */
    @Override
    public int deleteProcessBranchEndByBranchEndId(Long branchEndId)
    {
        return processBranchEndMapper.deleteProcessBranchEndByBranchEndId(branchEndId);
    }

    @Override
    public ProcessBranchEnd selectProcessBranchEnd2(Long branchEndId) {
        return processBranchEndMapper.selectProcessBranchEnd2(branchEndId);
    }
}
